<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://myfaces.apache.org/trinidad" prefix="tr"%>
<%@ taglib uri="http://myfaces.apache.org/trinidad/html" prefix="trh"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<f:view>
	<trh:html>
	<trh:head>
		<f:verbatim>
			<style>
body {
	font-size: 0.55em;
}

.left {
	float: left;
}

.right {
	float: right;
}
</style>
		</f:verbatim>
	</trh:head>
	<trh:body>
		<tr:outputText value="#{player.table.name}" />
		<tr:form>
			<tr:group>
				<h:panelGrid columns="15" cellspacing="0" cellpadding="0">
					<tr:panelBox binding="#{player.table.board[0]}" partialTriggers="dice restartGame">
						<tr:outputText value="#{player.table.board[0].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[1]}" partialTriggers="dice restartGame">
						<tr:outputText value="#{player.table.board[1].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[2]}" partialTriggers="dice restartGame">
						<tr:outputText value="#{player.table.board[2].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[3]}" partialTriggers="dice restartGame">
						<tr:outputText value="#{player.table.board[3].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[4]}" partialTriggers="dice restartGame">
						<tr:outputText value="#{player.table.board[4].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[5]}" partialTriggers="dice restartGame">
						<tr:outputText value="#{player.table.board[5].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[6]}" partialTriggers="dice restartGame">
						<tr:outputText value="#{player.table.board[6].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[7]}">
						<tr:outputText value="#{player.table.board[7].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[8]}">
						<tr:outputText value="#{player.table.board[8].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[9]}">
						<tr:outputText value="#{player.table.board[9].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[10]}">
						<tr:outputText value="#{player.table.board[10].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[11]}">
						<tr:outputText value="#{player.table.board[11].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[12]}">
						<tr:outputText value="#{player.table.board[12].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[13]}">
						<tr:outputText value="#{player.table.board[13].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[14]}">
						<tr:outputText value="#{player.table.board[14].message}" />
					</tr:panelBox>
				</h:panelGrid>

				<h:panelGrid columns="3" cellspacing="0" cellpadding="0">
					<tr:group>
						<tr:panelBox binding="#{player.table.board[48]}">
							<tr:outputText value="#{player.table.board[48].message}" />
						</tr:panelBox>
						<tr:panelBox binding="#{player.table.board[47]}">
							<tr:outputText value="#{player.table.board[47].message}" />
						</tr:panelBox>
						<tr:panelBox binding="#{player.table.board[46]}">
							<tr:outputText value="#{player.table.board[46].message}" />
						</tr:panelBox>
						<tr:panelBox binding="#{player.table.board[45]}">
							<tr:outputText value="#{player.table.board[45].message}" />
						</tr:panelBox>
						<tr:panelBox binding="#{player.table.board[44]}">
							<tr:outputText value="#{player.table.board[44].message}" />
						</tr:panelBox>
						<tr:panelBox binding="#{player.table.board[43]}">
							<tr:outputText value="#{player.table.board[43].message}" />
						</tr:panelBox>
						<tr:panelBox binding="#{player.table.board[42]}">
							<tr:outputText value="#{player.table.board[42].message}" />
						</tr:panelBox>
						<tr:panelBox binding="#{player.table.board[41]}">
							<tr:outputText value="#{player.table.board[41].message}" />
						</tr:panelBox>
						<tr:panelBox binding="#{player.table.board[40]}">
							<tr:outputText value="#{player.table.board[40].message}" />
						</tr:panelBox>
						<tr:panelBox binding="#{player.table.board[39]}">
							<tr:outputText value="#{player.table.board[39].message}" />
						</tr:panelBox>
						<tr:panelBox binding="#{player.table.board[38]}">
							<tr:outputText value="#{player.table.board[38].message}" />
						</tr:panelBox>
						<tr:panelBox binding="#{player.table.board[37]}">
							<tr:outputText value="#{player.table.board[37].message}" />
						</tr:panelBox>

					</tr:group>
					<h:panelGrid columns="1">
						<tr:spacer width="1038" height="10" />
						<tr:image source="images/dice/0.gif" />
						<tr:image source="images/dice/1.gif" />
						<tr:image source="images/dice/2.gif" />
						<tr:image source="images/dice/3.gif" />
						<tr:image source="images/dice/4.gif" />
						<tr:image source="images/dice/5.gif" />
						<tr:image source="images/dice/6.gif" />
						<tr:image source="images/dice/#{player.table.dice.lastVal}.gif" partialTriggers="dice restartGame" />
						<tr:commandButton id="dice" text="Roll" action="#{player.roll}" partialSubmit="true" disabled="#{!player.turn}"
							onclick="this.disabled = true;" partialTriggers="dice restartGame" />
						<tr:commandButton id="restartGame" text="Restart Game" action="#{player.table.restartGame}" partialSubmit="true" />
						<tr:panelBox contentStyle="background: #FFFF99; width:90px; height:150px;" background="transparent"
							inlineStyle="background: #FFFF99; margin: 0; padding: 0;" partialTriggers="dice restartGame">
							<tr:outputText value="#{player.table.board[player.pos].message}" />
						</tr:panelBox>
					</h:panelGrid>
					<tr:group>
						<h:panelGrid columns="1" cellspacing="0" cellpadding="0">
							<tr:panelBox binding="#{player.table.board[15]}">
								<tr:outputText value="#{player.table.board[15].message}" />
							</tr:panelBox>
							<tr:panelBox binding="#{player.table.board[16]}">
								<tr:outputText value="#{player.table.board[16].message}" />
							</tr:panelBox>
							<tr:panelBox binding="#{player.table.board[17]}">
								<tr:outputText value="#{player.table.board[17].message}" />
							</tr:panelBox>
							<tr:panelBox binding="#{player.table.board[18]}">
								<tr:outputText value="#{player.table.board[18].message}" />
							</tr:panelBox>
							<tr:panelBox binding="#{player.table.board[19]}">
								<tr:outputText value="#{player.table.board[19].message}" />
							</tr:panelBox>
							<tr:panelBox binding="#{player.table.board[20]}">
								<tr:outputText value="#{player.table.board[20].message}" />
							</tr:panelBox>
							<tr:panelBox binding="#{player.table.board[21]}">
								<tr:outputText value="#{player.table.board[21].message}" />
							</tr:panelBox>
							<tr:panelBox binding="#{player.table.board[22]}">
								<tr:outputText value="#{player.table.board[22].message}" />
							</tr:panelBox>
							<tr:panelBox binding="#{player.table.board[23]}">
								<tr:outputText value="#{player.table.board[23].message}" />
							</tr:panelBox>
							<tr:panelBox binding="#{player.table.board[24]}">
								<tr:outputText value="#{player.table.board[24].message}" />
							</tr:panelBox>
						</h:panelGrid>
					</tr:group>
				</h:panelGrid>
				<h:panelGrid columns="12" cellspacing="0" cellpadding="0">
					<tr:panelBox binding="#{player.table.board[36]}">
						<tr:outputText value="#{player.table.board[36].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[35]}">
						<tr:outputText value="#{player.table.board[35].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[34]}">
						<tr:outputText value="#{player.table.board[34].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[33]}">
						<tr:outputText value="#{player.table.board[33].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[32]}">
						<tr:outputText value="#{player.table.board[32].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[31]}">
						<tr:outputText value="#{player.table.board[31].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[30]}">
						<tr:outputText value="#{player.table.board[30].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[29]}">
						<tr:outputText value="#{player.table.board[29].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[28]}">
						<tr:outputText value="#{player.table.board[28].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[27]}">
						<tr:outputText value="#{player.table.board[27].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[26]}">
						<tr:outputText value="#{player.table.board[26].message}" />
					</tr:panelBox>
					<tr:panelBox binding="#{player.table.board[25]}">
						<tr:outputText value="#{player.table.board[25].message}" />
					</tr:panelBox>
				</h:panelGrid>
			</tr:group>
		</tr:form>
	</trh:body>
	</trh:html>
</f:view>
